﻿d = document;
w = window;
function getid(id){
    return d.getElementById(id); 
}
function getname(name){
    return d.getElementsByName(name); 
}
function addfav(){
	w.external.AddFavorite(location.href, d.title);
}
function tsize(n, who){
	if(who == null){who = 'content';}
	$("#" + who).css({"font-size": n + "px"});
}
function loadjs(name){
	d.write('<script src="/js/' + name + '.js"></script>');
}


loadjs('flash');
loadjs('jq');
loadjs('cookie');
loadjs('base64');


d.write('<link rel="shortcut icon" href="favicon.ico" >');

function kk(){
	$('#kk').css({'min-height':document.documentElement.scrollHeight-43});
}

/* 鼠标拖动 begin */
var drag_=false
var D=new Function('obj','return document.getElementById(obj);');
var oevent=new Function('e','if (!e) e = window.event;return e');
function move_obj(obj,parent){
	var x,y;
	if(!parent){
		parent = obj.parentNode;
	}
	var w = parseInt(parent.offsetWidth)/2;
	obj.onmousedown=function(e){
	drag_=true;
	with(parent){
		style.position="absolute";var temp1=offsetLeft;var temp2=offsetTop;
		x=oevent(e).clientX;y=oevent(e).clientY;
		document.onmousemove=function(e){
			if(!drag_)return false;
			with(parent){
				style.left=temp1+oevent(e).clientX-x+w+"px";
				style.top=temp2+oevent(e).clientY-y+"px";
				}
			}
		}
		document.onmouseup=new Function("drag_=false");
	}
}
/* 鼠标拖动 end */